import sympy


def sympy_derivative():
    x1 = sympy.symbols('x1')
    x2 = sympy.symbols('x2')
    y = x1 ** 3 + x1 * x2 + x2
    return sympy.diff(y, x2)


func = sympy_derivative()
print(func)
print(func.evalf(subs={'x1': 6}))
